package com.example.javaproject.bean;


import com.google.gson.annotations.Expose;


public class CommonResult {
    //    final static public int ERROR_NONE = -1;
//    final static public int OK = 0;
//    final static public int APP_RES_CODE = 200;//

    @Expose
    private String rc;
    @Expose
    private String message;
    @Expose
    private String RC;
    @Expose
    private String msg;
    @Expose
    private String code;
    @Expose
    private String app_res_code;//服务器返回代码值,针对支付宝soap 而言；


    /**
     * P365 所有服务器端的code，但是数值来源于3个app_res_code, rc,或者RC
     *
     * @return
     */
    /*public int getResCode() {
        int resCode = ResponseCode.CONFIG_ERROR;
        if (!TextUtils.isEmpty(app_res_code)) {

            try {
                resCode = Integer.parseInt(app_res_code);
            } catch (Exception e) {
                resCode = ResponseCode.CONFIG_ERROR;
                e.printStackTrace();
            }
            return resCode;
        }

        if (!TextUtils.isEmpty(code)) {

            try {
                resCode = Integer.parseInt(code);
            } catch (Exception e) {
                resCode = ResponseCode.CONFIG_ERROR;
                e.printStackTrace();
            }
            return resCode;
        }

        if (!TextUtils.isEmpty(rc)) {

            try {
                resCode = Integer.parseInt(rc);
            } catch (Exception e) {
                resCode = ResponseCode.CONFIG_ERROR;
                e.printStackTrace();
            }
            return resCode;
        }

        if (!TextUtils.isEmpty(RC)) {

            try {
                resCode = Integer.parseInt(RC);
            } catch (Exception e) {
                resCode = ResponseCode.CONFIG_ERROR;
                e.printStackTrace();
            }
            return resCode;
        }
        return resCode;

    }

    *//**
     * P365 所有服务器端的msg，但是数值来源于2个msg, message
     *
     * @return
     *//*
    public String getResMsg() {
        if (!TextUtils.isEmpty(msg)) {
            return msg;
        }

        if (!TextUtils.isEmpty(message)) {
            return message;
        }
        return "";
    }


    *//**
     * 支付宝，由舒慧维护的soap 服务器，出现异常，由客户端人为增加错误代码
     *
     * @param app_res_code
     *//*
    public void setResCode(String app_res_code) {
        this.app_res_code = app_res_code;
    }


    public String getmsg() {
        return msg;
    }

    public void setmsg(String msg) {
        this.msg = msg;
    }

    public String getmessage() {
        return message;
    }

    public void setmessage(String message) {
        this.message = message;
    }

    public void URLDecode() {
        message = StringUtil.urlDecode(message);
        msg = StringUtil.urlDecode(msg);
    }*/
}